﻿<UserControl x:Class="SlvPartecipazione.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:this="clr-namespace:SlvPartecipazione"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="1024" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <Grid x:Name="LayoutRoot" HorizontalAlignment="Center">
        <Grid.Background>
            <ImageBrush ImageSource="/SlvPartecipazione;component/IMG/Sfondo.png" Stretch="Uniform" AlignmentY="Top" />
        </Grid.Background>
        
        <Canvas x:Name="Wall" Width="1024" Height="768">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform x:Name="WallStretch" CenterX="0" CenterY="0"></ScaleTransform>
                    <TranslateTransform x:Name="WallTranslate"></TranslateTransform>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Canvas.Resources>
                <Storyboard x:Name="sbLose">
                    <DoubleAnimation From="-350" To="300" Duration="00:00:02" 
                                            Storyboard.TargetName="imgLose" 
                                            Storyboard.TargetProperty="(Canvas.Top)">
                        <DoubleAnimation.EasingFunction>
                            <BounceEase Bounces="4" EasingMode="EaseOut" Bounciness="2" />
                        </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                </Storyboard>
                <Storyboard x:Name="sbTxtLose">
                    <DoubleAnimation From="-350" To="650" Duration="00:00:02" 
                                            Storyboard.TargetName="txtGameOver" 
                                            Storyboard.TargetProperty="(Canvas.Top)">
                        <DoubleAnimation.EasingFunction>
                            <BounceEase Bounces="4" EasingMode="EaseOut" Bounciness="2" />
                        </DoubleAnimation.EasingFunction>
                    </DoubleAnimation>
                </Storyboard>
                <Storyboard x:Name="sbLampeggioDono">
                    <DoubleAnimation Storyboard.TargetName="btnDono" Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:0.5" AutoReverse="True" RepeatBehavior="00:00:03" />
                </Storyboard>
            </Canvas.Resources>
            <this:Risposta x:Name="ucRisposta" Grid.Column="2" Margin="40,0,0,0" Visibility="Collapsed" Canvas.ZIndex="300000"></this:Risposta>
            <Grid Width="1024" Height="768" Canvas.Top="-1">
                <Grid.Resources>
                    <Style x:Key="customButtonStyle" TargetType="Button">
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="BorderThickness" Value="0"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="Button">
                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" />
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Grid.Resources>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Button Grid.Column="1" Grid.Row="0" Margin="0,0,0,0" Content="GoTo" Height="30" Name="btnMostraInvito" Width="80" Click="btnMostraInvito_Click" Visibility="Collapsed" />
                <this:CircleBar x:Name="ucCircleBar" Height="120" Width="120" Grid.Column="2" Margin="0,60,5,0"></this:CircleBar>

                <StackPanel Grid.RowSpan="3" Grid.Row="0" Grid.Column="0" Margin="-110,65,0,0">
                    <this:PulsanteNota x:Name="pulsante7" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante6" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante5" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante4" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante3" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante2" ></this:PulsanteNota>
                    <this:PulsanteNota x:Name="pulsante1" ></this:PulsanteNota>
                </StackPanel>

                <Button Grid.Column="2" Margin="0,139,0,135" Grid.Row="1" Grid.RowSpan="2" x:Name="PlayPause" Click="PlayPause_Click" IsEnabled="True">
                    <Button.OpacityMask>
                        <ImageBrush ImageSource="/SlvPartecipazione;component/IMG/play.png" Stretch="None" />
                    </Button.OpacityMask>
                    <Image x:Name="myButtonImg" Source="IMG/play.png" Stretch="None" Cursor="Hand" />
                </Button>
                <TextBlock Name="txtIstruzioni" Grid.Column="3" Grid.RowSpan="4" Grid.ColumnSpan="2" Width="389" Margin="20,65,0,0" Text="prova" 
                           VerticalAlignment="Top" HorizontalAlignment="Left" TextWrapping="Wrap" FontFamily="Lucida Sans Unicode" FontSize="14" Foreground="White"></TextBlock>

                <Button Margin="116,113,114,112" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" Grid.RowSpan="2"  x:Name="btnDono" Visibility="Collapsed" Click="btnDono_Click" >
                    <Button.OpacityMask>
                        <ImageBrush ImageSource="/SlvPartecipazione;component/IMG/dono.png" Stretch="Uniform" />
                    </Button.OpacityMask>
                    <Image Cursor="Hand" Name="imgDono" Stretch="Uniform" Source="IMG/dono.png" />
                </Button>
                <TextBlock Grid.Column="3" Height="39" HorizontalAlignment="Left" Margin="22,23,0,0" Name="txtNome" Text="Ciao " VerticalAlignment="Top" Width="185" Foreground="#FFFFFF" FontSize="14" FontFamily="Lucida Sans Unicode" Grid.ColumnSpan="2" />
                <TextBlock Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="3" HorizontalAlignment="Center" Name="txtDownload" Text="" VerticalAlignment="Center" Foreground="#FFFFFF" FontSize="14" FontFamily="Lucida Sans Unicode" />
                <TextBlock Grid.Column="2" Grid.Row="3" Margin="0, 60, 0, 0" HorizontalAlignment="Center" Name="txtPerc" Text="" VerticalAlignment="Center" Foreground="#FFFFFF" FontSize="14" FontFamily="Lucida Sans Unicode" />
            </Grid>

            <Image Canvas.Top="-350" Canvas.Left="300" Source="IMG/Game_Over.png" Stretch="UniformToFill" x:Name="imgLose" Width="441" Height="326" />
            <TextBlock Canvas.Top="-100" Canvas.Left="300" Height="101" Name="txtGameOver" TextWrapping="Wrap" Foreground="White" FontSize="24" Width="524" Cursor="Hand"
Text="...ma puoi riprovare! 
I brani indovinati non ti saranno richiesti.
Clicca qui!" TextAlignment="Center" MouseLeftButtonUp="txtGameOver_MouseLeftButtonUp" />
            
            
        
        </Canvas>
        <MediaElement x:Name="brano1" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano2" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano3" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano4" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano5" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano6" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
        <MediaElement x:Name="brano7" AutoPlay="False" DownloadProgressChanged="myMediaElement_DownloadProgressChanged"></MediaElement>
    </Grid>

</UserControl>
